package com.example.batch.monitor.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 监控配置属性
 */
@Data
@ConfigurationProperties(prefix = "spring.batch.monitor")
public class MonitorProperties {

    /** 是否启用监控 */
    private boolean enabled = true;
    
    /** 应用名称 */
    private String applicationName = "unknown";
    
    /** 慢查询阈值(ms) */
    private long slowQueryThreshold = 1000;
    
    /** 大结果集阈值(行) */
    private int largeResultSetThreshold = 1000;
    
    /** 健康检查阈值 */
    private double healthCheckThreshold = 0.8;
    
    /** 指标收集间隔(ms) */
    private long collectionInterval = 60000;
    
    /** 数据源监控配置 */
    private DataSource dataSource = new DataSource();
    
    @Data
    public static class DataSource {
        /** 连接池告警阈值 */
        private double poolUsageThreshold = 0.8;
        
        /** 最大连接数告警阈值 */
        private int maxConnectionsThreshold = 20;
    }
} 